package com.cqc.googleplay.adapter;

import java.util.List;

import com.cqc.googleplay.application.ImageLoaderOptions;
import com.cqc.googleplay.http.NetUrl;
import com.nostra13.universalimageloader.core.ImageLoader;

import uk.co.senab.photoview.PhotoView;

import android.content.Context;
import android.view.ViewGroup;

public class Part3Adapter extends BasePagerAdapter<String> {

	public Part3Adapter(List<String> list) {
		super(list);
	}

	@Override
	public Object instantiateItem(ViewGroup container, int position) {
		String url = list.get(position);
		PhotoView photoView = new PhotoView(container.getContext());
		ImageLoader.getInstance().displayImage(NetUrl.IMAGE_PREFIX + url, photoView, ImageLoaderOptions.pagerOptions);
		container.addView(photoView);
		return photoView;
	}

}
